package com.leeoohoo.focus.dto;

import com.leeoohoo.base.PageDTO;
import com.leeoohoo.focus.FocusOn;
import com.leeoohoo.user.MyUser;
import com.oohoo.spacestationspringbootstarter.dto.query.DTO;
import com.oohoo.spacestationspringbootstarter.dto.query.annotation.Eq;
import com.oohoo.spacestationspringbootstarter.dto.query.annotation.From;
import com.oohoo.spacestationspringbootstarter.dto.query.annotation.Join;
import com.oohoo.spacestationspringbootstarter.dto.query.annotation.JoinColumn;
import lombok.Data;

@Data
@From(FocusOn.class)
@Join(fromClazz = FocusOn.class, fromField = "otherUserId", joinClazz = MyUser.class, joinField = "id")
public class FocusOnUserDTO extends PageDTO implements DTO {

    private Long id;
    @Eq
    private Long userId;

    @Eq
    private Integer type;

    private Long otherUserId;


    @JoinColumn(joinClass = MyUser.class, columnName = "nickName")
    private String nickName;

    @JoinColumn(joinClass = MyUser.class, columnName = "email")
    private String email;

}
